// @ts-nocheck
import fetch from "@blueos.network.fetch"


export const getMyOrder = (heart_rate, stress, shake_count) => {
  return new Promise((resolve, reject) => {
    fetch.fetch({
      url: "http://121.37.46.189:9000/v1/extract",
      method: 'post',
      responseType: 'json',
      header: { "Content-Type": "application/json" },
      timeout: 60,
      data: {
        "heart_rate": heart_rate,
        stress: stress,
        shake_count: shake_count
      },
      success: (res) => {
        resolve(res.data.data)
      },
      fail: (data, code) => {
        console.log('fail', data, code)
        reject()
      }
    })
  })

}
